#include <stdio.h>
#include <stdlib.h>

int input[1000001], len;

void f(int *list, int leftIndex, int rightIndex)
{
    int temp, l, r, n;

    if (leftIndex >= rightIndex)
    {
        return;
    }
    l = leftIndex;
    r = rightIndex;
    n = list[(l + r) / 2];
    
    while (l <= r)
    {
        while (list[r] > n)
        {
            r--;
        }
        while (list[l] < n)
        {
            l++;
        }

        if (l <= r)
        {
            temp = list[l];
            list[l] = list[r];
            list[r] = temp;
            r--;
            l++;
        }
    }
    f(list, leftIndex, r);
    f(list, l, rightIndex);
}

int main(int argc, char const *argv[])
{
    int i, n;
    scanf("%d", &n);
    len = n;
    for (i = 0; i < n; i++)
    {
        scanf("%d", &input[i]);
    }
    f(input, 0, n - 1);
    for (i = 0; i < n; i++)
    {
        if (i) printf(" ");
        printf("%d", input[i]);
    }
    return 0;
}
